Skip to content

Add mcpc formula - #55

Merged
jancurn merged 1 commit into
mainfrom
feat/add-mcpc-formula
Aug 17, 2026
Merged

Add mcpc formula#55
jancurn merged 1 commit into
mainfrom
feat/add-mcpc-formula

Conversation

@jancurn

@jancurn jancurn commented Jul 31, 2026

Copy link
Copy Markdown
Member

Adds a formula for mcpc, Apify's universal MCP command-line client, published to npm as @apify/mcpc. Installs the published npm tarball (which already contains the build output), so Homebrew only needs node.

mcpc is the first scoped package to go through the shared update flow, which needs two fixes for it:

  • update_formula.sh takes an optional NPM package name, because @apify/mcpc cannot be a formula name. Omitted, it still defaults to the formula name, and update_formula.yaml gained a matching optional npm_package input.
  • The sed separator moves from @ to |: an unescaped @ inside the replacement (.../@apify/mcpc-0.5.1.tgz) ends the expression early and fails with unknown option to `s'. Rerunning the updater for apify-cli 1.7.1 produces a byte-identical formula.

Two formula details worth a look:

  • The shebangs of both executables are rewritten to Homebrew's node, same as apify-cli.
  • test do deliberately require()s the @napi-rs/keyring native addon. It is tied to a Node.js ABI, and mcpc silently falls back to file-based credential storage when it fails to load — without the canary, a node major bump would quietly downgrade credential storage instead of failing here and asking for a revision bump.

Bumps are triggered by hand for now (mcpc's release workflow only prints the command), so after merging this the formula is verified by dispatching update_formula.yaml with package=mcpc, npm_package=@apify/mcpc, version=0.5.1. Draft until apify/mcpc#357 lands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BcRjUSnuwKjKhQRgKQ1zzv

mcpc is Apify's universal MCP command-line client (https://github.com/apify/mcpc),
published to npm as `@apify/mcpc`.

Being a scoped package, it needs two fixes in the shared update flow:

- `update_formula.sh` takes an optional NPM package name, since `@apify/mcpc`
  cannot be a formula name. Omitted, it keeps defaulting to the formula name.
- The `sed` separator moves from `@` to `|`: an unescaped `@` inside the
  replacement (`.../@apify/mcpc-0.5.1.tgz`) ends the expression early and fails
  with "unknown option to `s'". Rerunning the updater for `apify-cli` produces a
  byte-identical formula.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BcRjUSnuwKjKhQRgKQ1zzv
@jancurn
jancurn requested a review from fnesveda July 31, 2026 22:21
jancurn added a commit to apify/mcpc that referenced this pull request Jul 31, 2026
Lets macOS and Linux users install mcpc with `brew install
apify/tap/mcpc` instead of setting up Node.js or Bun first. The formula
lives in [apify/homebrew-tap](https://github.com/apify/homebrew-tap)
next to `apify-cli` (added in apify/homebrew-tap#55).

Its bump is started **manually for now** — the release workflow only
prints the `gh workflow run` command in its run summary rather than
dispatching it. That workflow points `Formula/mcpc.rb` at the new npm
tarball, installs and `brew test`s it on Linux and macOS, then merges
the bump.

- README documents Homebrew as the first install option
- Changelog entry, plus the manual bump command in the release section
of `CLAUDE.md`
- The release step is last and `continue-on-error`, so nothing
Homebrew-related can fail a release that is already tagged, published to
npm and announced
- Skipping a bump only leaves Homebrew users on the previous version;
npm and Bun installs are unaffected

Merge apify/homebrew-tap#55 before the first bump, otherwise there is no
formula to update.

Fixes #355

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01BcRjUSnuwKjKhQRgKQ1zzv

---------

Co-authored-by: Claude <noreply@anthropic.com>

@fnesveda fnesveda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 Are you planning on upstreaming this to https://github.com/homebrew/homebrew-core?

@jancurn

jancurn commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

I guess - is that how to get included in brew directory? Any advice about that would be appreciated.

@fnesveda

fnesveda commented Aug 6, 2026

Copy link
Copy Markdown
Member

You first have to send a PR to homebrew-core with the formula, to get it listed in the main repository, so it can be installed with brew install mcpc instead of brew install apify/tap/mcpc. E.g. we have apify-cli there: https://github.com/Homebrew/homebrew-core/blob/main/Formula/a/apify-cli.rb

And then every time a new version of mcpc is released, you need to send another PR to homebrew-core to bump the formula to the new version. We have it automated in the apify-cli release workflow: https://github.com/apify/apify-cli/blob/master/.github/workflows/release.yaml#L267-L315

CC @vladfrangu you were the one adjusting the Apify CLI Homebrew publication flow the last time, anything to look out for?

@vladfrangu

Copy link
Copy Markdown
Member

If I recall, I inherited the CLI automation from you peeps, and I don't recall any changes being done aside from adding myself to the ping message 😄. Do be careful with indentation, that will mess up the post on GitHub's end tho.

Assuming this is an npm package, you should be able to more-less 1:1 copy the step from apify-cli (after doing the initial PR manually). You can probably skip the Update Homebrew formula in apify/homebrew-tap repo step entirely (and maybe it's finally time we nuke it for cli too)

@jancurn
jancurn marked this pull request as ready for review August 9, 2026 17:13
@jancurn
jancurn requested a review from vladfrangu August 9, 2026 17:18
@jancurn

jancurn commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

Hey @vladfrangu @fnesveda do you think this is safe to merge?

@fnesveda

Copy link
Copy Markdown
Member

Good to go from my side 👍

@jancurn
jancurn merged commit e34fef0 into main Aug 17, 2026
1 check passed
@jancurn
jancurn deleted the feat/add-mcpc-formula branch August 17, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants